<html jwcid="@Shell" title="Results">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <title>Services</title>

        <link jwcid="@Style" href="info.css" media="all"/>

    </head>
    <body jwcid="@Body">

        <table width="100%" border="1">
            <tr>

                <td width="90%">
                    <span jwcid="@Phones"/>
                </td>

                <td width="10%" align="center">
                    <span jwcid="@ChargeButton" serviceID="ognl:serviceID"></span>
                </td>
            </tr>
        </table>
        <br>

        <input jwcid="@Errors" exceptions='ognl:exceptions'/>

        <br><br><br>

        <div align='center'>
            <span jwcid="@If" condition="ognl:searchType==1">
                <form jwcid="@Form">
                    <table>
                        <tr>

                            <td>
                                გვარი:
                            </td>
                            <td>
                                <input jwcid="lastName@TextField" value="ognl:abonentFound.lastName"
                                       validators="validators:minLength=2"/>
                            </td>

                            <td>
                                სახელი:
                            </td>
                            <td>
                                <input jwcid="@TextField" value="ognl:abonentFound.firstName"
                                       validators="validators:minLength=2"/>
                            </td>

                        </tr>
                    </table>
                    <br>
                    <table>
                        <tr>
                            <td>
                                მისამართი:
                            </td>
                            <td colspan="3">
                                <input jwcid="@AddressSearch" address="ognl:abonentFound.address"/>
                            </td>
                        </tr>
                    </table>
                    <br>
                    <table>
                        <tr>

                            <td colspan="2" align="right">
                                ტელეფონის ინდექსი
                            </td>



                            <td colspan="2" align="left">
                                <input jwcid="@TextField" value="ognl:abonentFound.phone.phone"/>
                            </td>
                        </tr>
                    </table>
                    <br>
                    <table>
                        <tr>

                            <td colspan="4" align="center">
                                <input jwcid="@Submit" action="listener:search" value="Search"/>
                                <input jwcid="@Submit" action="listener:clear" value="გასუფთავება"/>
                            </td>
                        </tr>
                    </table>
                </form>
            </span>
            <!--span jwcid="@If" condition="ognl:searchType==2">
                <form jwcid="@Form">
                    <table border="1" cellpadding="0" cellspacing="0" bordercolor="#000000">
                        <tr>
                            <td>
                                გვარი:
                            </td>
                            <td>
                                <input jwcid="lastNameAbroad@TextField" value="ognl:abonentFound.lastName"
                                       validators="validators:minLength=2"/>
                            </td>
                            <td>
                                სახელი:
                            </td>
                            <td>
                                <input jwcid="@TextField" value="ognl:abonentFound.firstName"
                                       validators="validators:minLength=2"/>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                ქვეყანა:
                            </td>
                            <td colspan="3">
                                <input jwcid="@PropertySelection" model='ognl:page.getComboes().getCombo("Countries")'
                                       value='ognl:country'> NABC </input>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="4" align="center">
                                <input jwcid="@Submit" action="listener:searchAbroad" value="Search"/>
                            </td>
                        </tr>
                    </table>
                </form>
            </span-->


            <span jwcid="@If" condition="ognl:searchType==3">
                <form jwcid="@Form">
                    <input jwcid="@TextField" value="ognl:abonentFound.phone.phone"
                           validators="validators:minLength=3"/>
                    <input jwcid="@Submit" action="listener:searchPhone" value="Search"/>
                    <input jwcid="@Submit" action="listener:clear" value="გასუფთავება"/>
                </form>
            </span>

              <div style="overflow:auto; height:300px">

            <span jwcid="@If" condition="ognl:abonentsFound!=null && abonentsFound.size()>0">
                <form jwcid="@Form">
                    <table border="1">
                        <tr>
                            <th>&nbsp;</th>
                            <th>&nbsp;&nbsp; გვარი &nbsp;&nbsp;</th>
                            <th> &nbsp;&nbsp; სახელი &nbsp;&nbsp;</th>
                            <th>&nbsp;&nbsp; ქალაქი/სოფელი &nbsp;&nbsp;</th>
                            <th>&nbsp;&nbsp; მისამართი &nbsp;&nbsp;</th>
                            <th>&nbsp;&nbsp; ტელეფონი &nbsp;&nbsp;</th>

                        </tr>

                        <span jwcid="@For" source="ognl:abonentsFound" value="ognl:loopAbonentFound">
                            <tr>
                                <td>
                                    <span jwcid="@If" condition='ognl:!loopAbonentFound.org'>
                                        <input type="Submit" jwcid="@Submit" parameters="ognl:loopAbonentFound" value="SMS" style="width: 35px" action="listener:sendSMS"/>
                                    </span>
                                    <span jwcid="@Else">
                                     &nbsp;&nbsp;  &nbsp;&nbsp;  &nbsp;&nbsp;
                                     </span>
                                </td>
                                <!--td -->
                                    <span jwcid="@If" condition='ognl:loopAbonentFound.org'>

                                         <span jwcid="@If" condition="ognl:loopAbonentFound.eprior!=0">
                            <td bgcolor="#C11B17">

                                <a jwcid="@DirectLink" listener="listener:openOrgResultPage" parameters="ognl:loopAbonentFound">
                                            <input jwcid="@Insert" value="ognl:loopAbonentFound.lastName"/>
                                        </a>



                            </td>
                        </span>

                        <span jwcid="@Else">

                    <span jwcid="@If" condition="ognl:loopAbonentFound.statuse==1">
                        <td bgcolor="#C38EC7">

                                <a jwcid="@DirectLink" listener="listener:openOrgResultPage" parameters="ognl:loopAbonentFound">
                                            <input jwcid="@Insert" value="ognl:loopAbonentFound.lastName"/>
                                        </a>




                        </td>
                    </span>
                    <span jwcid="@Else">
                        <span jwcid="@If" condition="ognl:loopAbonentFound.statuse==2">
                            <td bgcolor="#747170">
                                 <a jwcid="@DirectLink" listener="listener:openOrgResultPage" parameters="ognl:loopAbonentFound">
                                            <input jwcid="@Insert" value="ognl:loopAbonentFound.lastName"/>
                                        </a>
                            </td>
                        </span>


                        <span jwcid="@Else">
                            <!--span jwcid="@If" condition="ognl:organization.eprior==0" -->
                            <td>
                                <a jwcid="@DirectLink" listener="listener:openOrgResultPage" parameters="ognl:loopAbonentFound">
                                            <input jwcid="@Insert" value="ognl:loopAbonentFound.lastName"/>
                                        </a>
                            </td>
                            <!--/span -->
                        </span>
                    </span>
                </span>




                                        <!-- a jwcid="@DirectLink" listener="listener:openOrgResultPage" parameters="ognl:loopAbonentFound">
                                            <input jwcid="@Insert" value="ognl:loopAbonentFound.lastName"/>
                                        </a -->
                                    </span>
                                   
                                    <span jwcid="@Else">
                                       <td>
                                        <input jwcid="@Insert" value="ognl:loopAbonentFound.lastName"/>
                                    </td>
                                    </span>
                                
                                <td>
                                    <input jwcid="@Insert" value="ognl:loopAbonentFound.firstName"/>
                                </td>

                                <span jwcid="@If" condition="ognl:loopAbonentFound.hide==0">
                                    <td>
                                        <input jwcid="@Insert" value='ognl:page.getComboes().getCombo("Cities").getLabelFromPk(loopAbonentFound.address.cityID)'/>
                                    </td>
                                    <td>
                                        <input jwcid="@Insert" value="ognl:loopAbonentFound.address.streetName"/>
                                    </td>

                                      <span jwcid="@If" condition="ognl:loopAbonentFound.state==6">
                                     <td>
                                        <input jwcid="@Insert" value="ognl:loopAbonentFound.phone.phoneState"/>
                                    </td>
                                    </span>
                                <span jwcid="@Else">


                                    <span jwcid="@If" condition="ognl:loopAbonentFound.phone.phoneStatusID==3">
                                     <td>
                                         <font color="blue">
                                        <input jwcid="@Insert" value="ognl:loopAbonentFound.phone.phone"/>
                                    </font>
                                         </td>
                                    </span>
                                <span jwcid="@Else">
                                <td>
                                        <input jwcid="@Insert" value="ognl:loopAbonentFound.phone.phone"/>
                                    </td>
                                     </span>
                                     </span>
                                    <!--
                                <td>
                                    <input jwcid="@Insert" value="ognl:loopAbonentFound.phone.phoneStatus"/>
                                    <span jwcid="@If" condition="ognl:loopAbonentFound.phone.parallel==1">
                                        პარალელური
                                    </span>
                                </td>
                                -->
                                </span>
                                <span jwcid="@Else">
                                    <td colspan="4">
                                        მონაცემი დაფარულია
                                    </td>
                                </span>
                            </tr>
                        </span>
                    </table>
                </form>
            </span>
            </div>
            <span jwcid="@Else">
                მონაცემები ვერ მოიძებნა
            </span>
        </div>
    </body>
</html>